<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ctg="http://www.crotouristguide.com/taglib">
<body>
<ui:composition template="/templates/layout/columns_1.xhtml">
	<ui:define name="column1">
		<s:div styleClass="title"><h1><h:outputText value="#{messages['title.dogadjaji.list']}" />
		</h1></s:div>
		<rich:dataTable value="#{dogadjaji}" var="d" width="100%" styleClass="list" columnClasses="rich-separator,rich-separator">
			<h:column>
				<s:div styleClass="leftm">
					<h:outputLink value="http://#{d.www}" styleClass="pnlDogadjaji">
						<img alt="#{messages['label.image.alt']} #{d.mjesto.naziv}" width="90" height="60"
							src="#{slikaAction.getPocSlikaPath(d,'s')}">
						</img>
						</h:outputLink>
				</s:div>
				<s:div styleClass="left">
					<s:span
						rendered="#{d.getOpis(locale.language).naziv.length() > 0}">
						<h3><h:outputLink value="http://#{d.www}" styleClass="pnlDogadjaji"><h:outputText
							value="#{d.getOpis(locale.language).naziv}" /></h:outputLink>
						</h3>
					</s:span>
					<p>
						<h:outputText value="#{d.getOpis(locale.language).opis}" />
					
					<h:outputLink value="http://#{d.www}" styleClass="pnlDogadjaji">
						<h:outputText value="#{messages['label.link.more']}" />
					</h:outputLink></p>
					<s:div>
						<h:outputText value="#{d.datumOd} - #{d.datumDo}" />
					</s:div>
				</s:div>
				<br class="clearb"/>
					<s:link value="#{messages['label.edit']}"
						action="#{dogadjajAction.editSetup('backToDogadjajiMjesta')}">
						<f:param name="idMjesta" value="#{d.mjesto.idMjesta}" />
					</s:link>				
			</h:column>
		</rich:dataTable>	
		<script type="text/javascript">
		 jQuery(function() {	 
			 jQuery('a.pnlDogadjaji').click(function() {
				new Boxy('<iframe frameborder="0" marginheight="0" marginwidth="0" class="loading" src="' + this.href + '">Test</iframe>',{title:'#{messages['subtitle.objava']}'}).resize(900,700);
				return false; 
			 });
		 });
		</script>			
	</ui:define>
	<ui:define name="column2">

	</ui:define>
</ui:composition>
</body>
</html>